<%@ Control Language="vb" AutoEventWireup="false"  Explicit="true" CodeFile="View.ascx.vb" Inherits="NVPortal.Modules.NVTuyenDung.View" %>
<link href="/js/jquery-ui-1.8.13.custom.css" rel="stylesheet" type="text/css" />
<script src="/Resources/Shared/scripts/jquery/jquery.min.js" type="text/javascript"></script>
<script type="text/javascript" language="javascript" src="/js/jquery-ui-1.8.13.custom.min.js"></script>
<script type="text/javascript" language="javascript" src="/js/jquery.ui.datepicker-vi.js"></script>
<script type="text/javascript" language="JavaScript" src="/js/NVCorp.js"></script>

<script>
    !window.jQuery && document.write('<script src="jquery-1.4.3.min.js"><\/script>');
	</script>
	<script type="text/javascript" src="/Jquery/fancybox/jquery.mousewheel-3.0.4.pack.js"></script>
	<script type="text/javascript" src="/Jquery/fancybox/jquery.fancybox-1.3.4.pack.js"></script>
	<link rel="stylesheet" type="text/css" href="/Jquery/fancybox/jquery.fancybox-1.3.4.css" media="screen" />
<style type="text/css">
.UN_Item, .SubHead {font-family:Arial; font-size: 12px; color:#434343;font-weight:normal;}
.UN_Header {background:#006699; font-family:Arial; font-size: 12px; color:#fff;}
.DatetimePicker_Textbox, .txtTitleClass {height: 30px; background: #fff; border: solid 1px #ddd; font-family: Tahoma; font-size: 14px; padding: 3px;}
.TuyenDungTitle {font-family: Arial; font-size: 12px; color: blue; font-weight: bold;}
</style>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
	<tr>
		<td style="width: 10%; padding: 5px; text-align: right; height: 40px;"><asp:label CssClass="SubHead" id="Label1" runat="server">Tiêu đề</asp:label></td>
		<td style="width: 90%;" colspan="5"><asp:textbox id="txtTitle" CssClass="txtTitleClass" runat="server" Width="380px"></asp:textbox></td>
	</tr>
	<tr>
        <td style="padding: 5px; text-align: right;"><asp:label id="Label2" CssClass="SubHead" runat="server">Ngày đăng:</asp:label></td>
        <td colspan="5">
            <table>
                <tr>
		            <td><asp:label id="Label4" CssClass="SubHead" runat="server">Từ ngày</asp:label></td>
		            <td><asp:textbox id="txtStartdate" runat="server" Width="126px" CssClass="DatetimePicker_Textbox"></asp:textbox></td>
                    <td style="width:20px;"></td>
		            <td><asp:label id="Label6" CssClass="SubHead" runat="server">Đến ngày</asp:label></td>
		            <td><asp:textbox id="txtEndDate" runat="server" Width="126px" CssClass="DatetimePicker_Textbox"></asp:textbox></td>
	            </tr>
            </table>
        </td>
    </tr>
	<tr>
		<td style="width: 10%; padding: 5px; text-align: right; height: 40px;"><asp:label CssClass="SubHead" id="Label3" runat="server">Công ty</asp:label></td>
		<td><asp:dropdownlist id="ddlCongty" CssClass="txtTitleClass" runat="server" Width="160px"></asp:dropdownlist></td>
		<td style="width: 20%; padding: 5px; text-align: right; height: 40px;"><asp:label CssClass="SubHead" id="Label10" runat="server">Vị trí tuyển dụng</asp:label></td>
		<td><asp:dropdownlist id="ddlVitri" CssClass="txtTitleClass" runat="server" Width="160px"></asp:dropdownlist></td>
        <td style="width: 10%; padding: 5px; text-align: right; height: 40px;"><asp:label CssClass="SubHead" id="Label7" runat="server">Trạng thái</asp:label></td>
		<td><asp:dropdownlist id="ddlStatus" CssClass="txtTitleClass" runat="server" Width="160px"></asp:dropdownlist></td>
	</tr>
	<tr>
	    <td></td>
		<td><table cellpadding="0" cellspacing="0"><tr><td><img src="/images/icons/find.png" alt="Tìm tin" /></td><td><asp:linkbutton id="lbtFind" runat="server" Font-Bold="true">Tìm tin</asp:linkbutton></td></tr></table></td>
	</tr>
	
    </table>
    <table width="100%">
        
       <tr>
        <td>
            <table style="background-color:#d2d2d2; height:20px;" cellpadding="0" cellspacing="0" width="100%">
                <tr>
                    <td style="font-family: Arial; font-size: 12px; padding-left: 5px;">Tổng số có <asp:Label ID="lbTotalNewsFind" runat="server" ForeColor="Maroon" Font-Bold="true" Text="00"></asp:Label> tin tuyển dụng tìm được</td>
                    <td align="right">Hiển thị 
                        <asp:DropDownList ID="ddlPageSize" runat="server" AutoPostBack="True">
                            <asp:ListItem>10</asp:ListItem>
                            <asp:ListItem>20</asp:ListItem>
                            <asp:ListItem>40</asp:ListItem>
                        </asp:DropDownList> tin / trang</td>
                </tr>
            </table>
        </td>
    </tr>
    <tr>
            <td>
                <table cellpadding="0" cellspacing="0" width="100%">
                <tr>
                    <td style="font-family: Arial; font-size: 12px">
                        Chọn 
                        <asp:CheckBox ID="CheckBox1" runat="server" /> để 
                        <asp:LinkButton ID="lbtSendForApprove" runat="server"><img src="/images/Aguidang.jpg" alt="Gửi đăng" border="0" /></asp:LinkButton> hoặc 
                        <asp:LinkButton ID="lbtDelete" runat="server"><img src="/images/Axoa.jpg" alt="Xóa" border="0" /></asp:LinkButton>
                    </td>
                </tr>
            </table>
            </td>
        </tr>
    <tr><td><table cellpadding="0" cellspacing="0"><tr><td><asp:LinkButton id="lbAddNewsTop" runat="server" Font-Bold="true"><img src="/images/Athemmoi.jpg" style="border: 0px;" alt="Thêm tin mới" /></asp:LinkButton></td></tr></table></td></tr>
	<tr>
		<td>
        <asp:UpdatePanel ID="udpComent" runat="server">
            <ContentTemplate>			
			<asp:datagrid id="drgDataViewer" DataKeyField="id" runat="server" Width="100%" AllowPaging="true" AutoGenerateColumns="False"
				CellPadding="3" BackColor="White" Font-Names="Arial" BorderWidth="1px" BorderStyle="None" BorderColor="#CCCCCC" PageSize="10">
				<SelectedItemStyle Font-Bold="true" ForeColor="White" BackColor="#669999"></SelectedItemStyle>
				<ItemStyle ForeColor="#000066" Font-Names="Arial"></ItemStyle>
				<FooterStyle ForeColor="#000066" Font-Names="Arial" BackColor="White"></FooterStyle>
				<Columns>
				     <asp:TemplateColumn>
	                    <HeaderTemplate>
                            <asp:CheckBox ID="chkItemsTop" runat="server" />
	                    </HeaderTemplate>
                        <ItemTemplate>
                            <asp:CheckBox ID="chkItems" runat="server" />
                        </ItemTemplate>
                        <ItemStyle Width="20" />
                        <HeaderStyle CssClass="UN_Header" />
                    </asp:TemplateColumn>
					<asp:TemplateColumn HeaderText="Ảnh">
                        <ItemTemplate>
                            <asp:Image width="60" Visible='<%# iif(DataBinder.Eval(Container, "DataItem.avatar").tostring() <> "",true,false) %>' ImageUrl ='<%# PortalSettings.HomeDirectory & "TuyenDung/" & DataBinder.Eval(Container, "DataItem.avatar") %>' AlternateText="" ID="imgNews" runat="server" />
                        </ItemTemplate>
                        <HeaderStyle CssClass="UN_Header" />
                        <ItemStyle Width="60" CssClass="UN_Item" />
                    </asp:TemplateColumn>
					<asp:BoundColumn DataField="Id" HeaderText="M&#227; tin" Visible="False" ></asp:BoundColumn>
					<asp:TemplateColumn HeaderText="Thuộc tính">
                        <ItemTemplate>
                            <b>Tiêu đề:</b> <asp:Label ID="Label5" runat="server" CssClass="TuyenDungTitle" Text='<%# DataBinder.Eval(Container.DataItem, "Title") %>'></asp:Label>
                            <br />
                            <b>Ngày đăng: </b><asp:Label ID="Label8" runat="server" Text='<%# CDate(DataBinder.Eval(Container.DataItem, "createdate")).ToString("dd/MM/yyy") %>'></asp:Label>
                            <br />
                            <b>Mã Tuyển Dụng </b><asp:Label ID="Label9" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "Maso") %>'></asp:Label>
                        </ItemTemplate>
                        <HeaderStyle CssClass="UN_Header" />
                        <ItemStyle CssClass="UN_Item" />
                    </asp:TemplateColumn>
                    <asp:TemplateColumn HeaderText="Công ty tuyển dụng">
                        <ItemTemplate>
                            <asp:Label ID="Label12" runat="server" Text='<%# GetCongtyName(DataBinder.Eval(Container.DataItem, "Congty")) %>'></asp:Label>
                        </ItemTemplate>
                        <HeaderStyle CssClass="UN_Header" />
                        <ItemStyle CssClass="UN_Item" />
                    </asp:TemplateColumn>
                    <asp:TemplateColumn HeaderText="Vị trí tuyển dụng">
                        <ItemTemplate>
                            <asp:Label runat="server" Text='<%# GetVitriName(DataBinder.Eval(Container.DataItem, "Vitri")) %>'></asp:Label>
                        </ItemTemplate>
                        <HeaderStyle CssClass="UN_Header" />
                        <ItemStyle CssClass="UN_Item" />
                    </asp:TemplateColumn>
                    <asp:TemplateColumn HeaderText="Ngày hết hạn">
                        <ItemTemplate>
                            <asp:Label ID="Label11" runat="server" Text='<%# CDate(DataBinder.Eval(Container.DataItem, "Ngayhethan")).ToString("dd/MM/yyy") %>'></asp:Label>
                        </ItemTemplate>
                        <HeaderStyle CssClass="UN_Header" />
                        <ItemStyle CssClass="UN_Item" />
                    </asp:TemplateColumn>
                    <%--<asp:TemplateColumn HeaderText="B/luận">
						<ItemTemplate>
							<asp:Label ID="Label1" runat="server" Text='<%# iif(DataBinder.Eval(Container.DataItem, "BinhLuan")="True","Có","Không") %>'></asp:Label>
						</ItemTemplate>
						<HeaderStyle CssClass="UN_Header" />
						<ItemStyle Width="20" CssClass="UN_Item" />
					</asp:TemplateColumn>--%>
                    <asp:TemplateColumn HeaderText="Sửa">
						<ItemTemplate>
							<asp:HyperLink ID="cmdEdit" ImageUrl="~/images/Aedit.jpg" NavigateUrl='<%# "/tabid/" & tabid & "/view/edit/tuyendung/" & DataBinder.Eval(Container.DataItem,"id") & "/" & ReplaceChuoi(DataBinder.Eval(Container.DataItem,"title")) & ".aspx" %>' runat="server" />
						</ItemTemplate>
						<HeaderStyle CssClass="UN_Header" />
						<ItemStyle Width="20" CssClass="UN_Item" />
					</asp:TemplateColumn>
                    <asp:TemplateColumn HeaderText="VIEW">
						<ItemTemplate>
							<asp:HyperLink ID="various3" ImageUrl="~/images/Aview.png" NavigateUrl='<%# "/view/tuyendung/" & DataBinder.Eval(Container.DataItem,"id") & "/" & ReplaceChuoi(DataBinder.Eval(Container.DataItem,"title")) & ".htm" %>' runat="server" />
						</ItemTemplate>
						<HeaderStyle CssClass="UN_Header" />
						<ItemStyle Width="20" CssClass="UN_Item" />
					</asp:TemplateColumn>
				</Columns>
				<PagerStyle HorizontalAlign="Left" ForeColor="#000066" BackColor="White" Mode="NumericPages"></PagerStyle>
			</asp:datagrid>
		    </ContentTemplate>
        </asp:UpdatePanel>	
	    </td>
	</tr>
	<tr>
		<td>
			<table cellpadding="0" cellspacing="0"><tr><td><asp:LinkButton id="lbtAddNews" runat="server" Font-Bold="true"><img src="/images/Athemmoi.jpg" style="border: 0px;" alt="Thêm tin mới" /></asp:LinkButton></td></tr></table></td>
	</tr>
</table>
<script type="text/javascript" language="javascript">
    $(function () {
        // Datepicker
        $('.DatetimePicker_Textbox').datepicker({
            dateFormat: "yy/mm/dd",
            inline: true,
            showAnim: 'slideDown',
            duration: 100,
            changeMonth: true,
            changeYear: true,
            showWeek: false,
            showOn: 'both',
            buttonImage: '/images/calendar.png',
            buttonImageOnly: true,
            showButtonPanel: true
        });
    });
</script>
<script type="text/javascript">
    $(document).ready(function () {
        $("#dnn_ctr455_MainEdit_ctl00_drgDataViewer_ctl03_various3").fancybox({
            'width': '75%',
            'height': '75%',
            'autoScale': false,
            'transitionIn': 'none',
            'transitionOut': 'none',
            'type': 'iframe'
        });
    });
	</script>